{extend name="app/shop/view/base.html"/}
{block name="resources"}
<style>
	.ns-form-row{margin-top: 0;}
</style>
{/block}
{block name="main"}
<div class="layui-form">
	<div class="layui-card ns-card-common ns-card-brief">
		<div class="layui-card-header">
			<span class="ns-card-title">微信公众号设置</span>
		</div>

		<div class="layui-card-body">
			<div class="layui-form-item">
				<label class="layui-form-label">公众号名称：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.nick_name ?? ''}</span>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">主体信息：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.principal_name ?? ''}</span>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">公众号类型：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.service_type_info ?? ''}</span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">认证情况：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.verify_type_info ?? ''}</span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">微信公众号：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.alias ?? ''}</span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">公众号授权状态：</label>
				<div class="layui-input-block">
					<span class="open-text">已授权&nbsp;&nbsp;&nbsp;<a class="ns-text-color" href="{:addon_url('wxoplatform://shop/oplatform/wechatsettled')}">重新授权</a></span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">公众号头像：</label>
				<div class="layui-input-block">
					<div class="upload-img-block square">
						<div class="upload-img-box">
							<img src="{:img($config.value.head_img)}"/>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">公众号二维码：</label>
				<div class="layui-input-block">
					<div class="upload-img-block square">
						<div class="upload-img-box">
							<img src="{:img($config.value.qrcode_url)}"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="layui-card ns-card-common ns-card-brief">
		<div class="layui-card-header">
			<span class="ns-card-title">开发者ID设置</span>
		</div>

		<div class="layui-card-body">
			<div class="layui-form-item">
				<label class="layui-form-label">APPID：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.authorizer_appid ?? ''}</span>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">原始ID：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.user_name ?? ''}</span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">开放平台帐号ID：</label>
				<div class="layui-input-block">
					<span class="open-text">{$config.value.component_appid ?? ''}</span>
				</div>
			</div>

		</div>
	</div>
	<div class="ns-single-filter-box">
		<div class="ns-form-row">
			<button type="reset" class="layui-btn layui-btn-primary" onclick="back()">返回</button>
		</div>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	layui.use(['form'], function () {
		var form = layui.form;
		form.render();
	});

	function back() {
		location.href = "{:addon_url('wechat://shop/wechat/setting')}";
	}
</script>
{/block}